{% extends 'AdminPanelDashboardBundle::layout.html.twig' %}


{% block stylesheets %}
  {{ parent() }}
{% endblock %}
{% block content %}

<div id="content">
  <ul class="breadcrumb">
    <li><a href="index.php" class="glyphicons home"><i></i> AdminPlus</a></li>
    <li class="divider"></li>
    <li>Site Pages</li>
  </ul>
  <div class="separator"></div>

  <div class="heading-buttons">
    <h3 class="glyphicons sort"><i></i> Main slider</h3>
    <div class="buttons pull-right">
      <a href="{{ path('mainSlider_new') }}" class="btn btn-primary btn-icon glyphicons circle_plus"><i></i> Шинэ slide</a>      
    </div>
  </div>
  <div class="separator"></div>

  <table class="table table-bordered table-condensed table-striped table-vertical-center checkboxs js-table-sortable ui-sortable">
    <thead>
      <tr>
        <th>№</th>
        <th>Зураг</th>
        <th>Гарчиг</th>
        <th>Төлөв</th>
        <th></th>
      </tr>
    </thead>
    <tbody>
      {% set counter = 1 %}
    {% for entity in entities %}
        <tr>          
          <td>{{counter}}</td>
          <td>{{ entity.image }}</td>
          <td>{{ entity.title }}</td>
          <td>{% if entity.isActive == 1%}Идэвхтэй{% endif %} / {% if entity.isPublish == 1 %} Харагдаж байгаа{% endif %}</td>          
          <td>
            <a href="{{ path('mainSlider_edit', { 'id': entity.id }) }}">edit</a>
          </td>
        </tr>
        {% set counter = counter + 1 %}
    {% endfor %}
      </tbody>
    </table>
    <br/>		
    <!-- End Content -->
  </div>

{% endblock %}

